<% '========================================================= ' File: dispbbs.asp ' Version:5.0 ' Date: 2002-9-7 ' Script Written by satan '========================================================= ' Copyright (C) 2001,2002 AspSky.Net. All rights reserved. ' Web: http://www.aspsky.net,http://www.dvbbs.net ' Email: info@aspsky.net,eway@aspsky.net '========================================================= Dim AnnounceID Dim ReplyID Dim Star,nSkin,SkinPic,Skiname Dim Topic_1,IsTop,IsBest,IsVote Dim UserName,view,times Dim onlineUserList Dim userhiddensql Dim Page_Count,TotalRec,abgcolor,bgcolor Dim TopicCount Dim Pcount,endpage Dim isagree,noagree Dim PostUserName,PostUserid Dim pollid Dim TotalUseTable Dim canreply,mycanreply Dim LockTopic dim PostBuyUser Page_count=0 canreply=false i=1 if boardmaster or master then userhiddensql="" else userhiddensql=" and userhidden=2" end if stats="浏览帖子" if BoardID="" or (not isInteger(BoardID)) or BoardID="0" then Errmsg=Errmsg+"
"+"
  • 错误的版面参数!请确认您是从有效的连接进入。" founderr=true else BoardID=clng(BoardID) end if if request("id")="" then Errmsg=Errmsg+"
    "+"
  • 请指定相关贴子。" founderr=true elseif not isInteger(request("id")) then Errmsg=Errmsg+"
    "+"
  • 非法的贴子参数。" founderr=true else AnnounceID=request("id") end if if request("replyid")="" then replyid=Announceid elseif not isInteger(request("replyid")) then replyid=Announceid else replyid=request("replyid") end if if request("star")="" or not isnumeric(request("star")) then star=1 else star=clng(request("star")) end if if request("skin")="" or not isnumeric(request("skin")) then skin=Cint(Board_setting(24)) else skin=Cint(request("skin")) end if if skin=1 then nskin=0 skinpic=Forum_boardpic(12) skiname="平板" elseif skin="0" then nskin=1 skinpic=Forum_boardpic(11) skiname="树形" else skin=0 nskin=1 skinpic=Forum_boardpic(11) skiname="树形" end if if cint(Board_Setting(2))=1 then if not founduser then Errmsg=Errmsg+"
    "+"
  • 本论坛为认证论坛,请登陆并确认您的用户名已经得到管理员的认证后进入。" founderr=true else if chkboardlogin(boardid,membername)=false then Errmsg=Errmsg+"
    "+"
  • 本论坛为认证论坛,请确认您的用户名已经得到管理员的认证后进入。" founderr=true end if end if end if if cint(Board_Setting(1))=1 then if Cint(GroupSetting(37))=0 then Errmsg=ErrMsg+"
    "+"
  • 您没有权限进入隐含论坛!" founderr=true end if end if if founderr then call nav() call head_var(2,0,"","") call dvbbs_error() else conn.execute("update topic set hits=hits+1 where topicid="&Announceid) sql="select title,istop,isbest,PostUserName,PostUserid,hits,isvote,child,pollid,LockTopic,PostTable from topic where topicID="&Announceid set rs=conn.execute(sql) if not(rs.bof and rs.eof) then if rs("locktopic")=2 then ErrMsg=ErrMsg+"
    "+"
  • 该帖子已经被管理员删除!
  • " founderr=true end if topic_1=rs(0) istop=rs(1) isbest=rs(2) PostUserName=rs(3) PostUserID=rs(4) view=rs(5) isVote=rs(6) TopicCount=rs(7)+1 pollid=rs(8) Locktopic=rs(9) TotalUseTable=rs(10) stats=topic_1 if PostUserName=membername then call readRe() mycanreply=GroupSetting(4) else mycanreply=GroupSetting(5) if Cint(GroupSetting(2))=0 then Errmsg=Errmsg+"
    "+"
  • 您没有浏览在本论坛查看其他人发布的帖子的权限,请登陆或者同管理员联系。" founderr=true end if end if else ErrMsg=ErrMsg+"
    "+"
  • 您指定的贴子不存在
  • " founderr=true end if set rs=nothing call nav() call head_var(1,BoardDepth,0,0) if founderr then call dvbbs_error() else call main() if founderr then call dvbbs_error() end if end if call footer() sub main() if ((not cint(Board_Setting(0))=1) and Cint(mycanreply)=1 and Cint(locktopic)=0) or (master or superboardmaster or boardmaster) then canreply=true end if if IsVote=1 then Dim vrs,vote,vote_1,votenum,votenum_1,m,g,votetype Dim vurs,voteyes voteyes=0 g=0 sql="select * from vote where VoteID="&PollID set vrs=server.createobject("adodb.recordset") vrs.open sql,conn,1,1 if not (vrs.eof and vrs.bof) then voteyes=1 response.write "" vote=split(vrs("vote"),"|") votenum=split(vrs("votenum"),"|") for i = 0 to ubound(votenum) votenum_1=cint(votenum_1)+votenum(i) next if votenum_1=0 then votenum_1=1 for m = 0 to ubound(vote) g=g+1 if g=11 then g=1 if cint(vrs("votetype"))=0 then votetype="" else votetype="" end if response.write "" next if not founduser or datediff("d",vrs("timeout"),Now())>0 then response.write "" else set vurs=conn.execute("select userid from voteuser where voteid="&PollID&" and userid="&userid) if vurs.eof and vurs.bof then response.write "" else response.write "" end if set vurs=nothing end if response.write "
    [投票]:"&Topic_1&"
    "&m+1&". "&votetype & htmlencode(vote(m))&" "&votenum(m)&"票
    您还没有登陆,不能进行投票;或者已经过了投票期限。[查看投票用户]
    [截止时间:"&vrs("timeout")&" | 查看投票用户]
    您已经投过票了,请看结果吧。[过期时间:"&vrs("timeout")&" | 查看投票用户]

    " end if vrs.close set vrs=nothing end if %> align=center>
      <%if (Cint(Board_Setting(43))=0 and Cint(Board_Setting(0))=0) or (Cint(Board_Setting(43))=0 and Cint(Board_Setting(0))=1 and (master or superboardmaster or boardmaster)) then%> 发表一个新主题  发表一个新投票  回复主题 <%else%> 本论坛已锁定,不允许进行发贴/回帖等操作 <%end if%> 您是本帖的第 <%=view%> 个阅读者浏览上一篇主题  刷新本主题   &star=<%=star%>&skin=<%=nskin%>"><%=skiname%显示贴子> 浏览下一篇主题
     * 贴子主题: <%=htmlencode(topic_1)%> 保存该页为文件  alt=报告本帖给版主 border=0>  显示可打印的版本  把本贴打包邮递  把本贴加入论坛收藏夹  发送本页面给朋友  ')">把本贴加入IE收藏夹 
    <% if request("action")="dispaudit" then dim AdminLockTopic AdminLockTopic=false if (master or superboardmaster or boardmaster) and Cint(GroupSetting(36))=1 then AdminLockTopic=true else AdminLockTopic=false end if if Cint(GroupSetting(36))=1 and UserGroupID>3 then AdminLockTopic=true end if if FoundUserPer and Cint(GroupSetting(36))=1 then AdminLockTopic=true elseif FoundUserPer and Cint(GroupSetting(36))=0 then AdminLockTopic=false end if if not AdminLockTopic then Errmsg=Errmsg+"
    "+"
  • 您没有在本版面审核帖子的权限。" founderr=true exit sub end if sql="Select B.AnnounceID,B.BoardID,B.UserName,B.Topic,B.dateandtime,B.body,B.Expression,B.ip,B.RootID,B.signflag,B.isbest,B.PostUserid,B.layer,b.isagree,U.useremail,U.homepage,U.oicq,U.sign,U.userclass,U.title,U.width,U.height,U.article,U.face,U.addDate,U.userWealth,U.userEP,U.userCP,U.birthday,U.sex,u.UserGroup,u.LockUser,u.userPower,U.titlepic,U.UserGroupID,U.LastLogin,B.PostBuyUser from "&TotalUseTable&" B inner join [user] U on U.UserID=B.PostUserID where B.BoardID="&BoardID&" and B.AnnounceID="&replyID else if cint(skin)=1 and replyid=Announceid then sql="Select top 1 B.AnnounceID,B.BoardID,B.UserName,B.Topic,B.dateandtime,B.body,B.Expression,B.ip,B.RootID,B.signflag,B.isbest,B.PostUserid,B.layer,b.isagree,U.useremail,U.homepage,U.oicq,U.sign,U.userclass,U.title,U.width,U.height,U.article,U.face,U.addDate,U.userWealth,U.userEP,U.userCP,U.birthday,U.sex,u.UserGroup,u.LockUser,u.userPower,U.titlepic,U.UserGroupID,U.LastLogin,B.PostBuyUser from "&TotalUseTable&" B inner join [user] U on U.UserID=B.PostUserID where B.BoardID="&BoardID&" and B.rootID="&AnnounceID&" and B.locktopic<2 order by Announceid" elseif cint(skin)=1 then sql="Select B.AnnounceID,B.BoardID,B.UserName,B.Topic,B.dateandtime,B.body,B.Expression,B.ip,B.RootID,B.signflag,B.isbest,B.PostUserid,B.layer,b.isagree,U.useremail,U.homepage,U.oicq,U.sign,U.userclass,U.title,U.width,U.height,U.article,U.face,U.addDate,U.userWealth,U.userEP,U.userCP,U.birthday,U.sex,u.UserGroup,u.LockUser,u.userPower,U.titlepic,U.UserGroupID,U.LastLogin,B.PostBuyUser from "&TotalUseTable&" B inner join [user] U on U.UserID=B.PostUserID where B.BoardID="&BoardID&" and B.AnnounceID="&replyID&" and B.locktopic<2" else sql="Select B.AnnounceID,B.BoardID,B.UserName,B.Topic,B.dateandtime,B.body,B.Expression,B.ip,B.RootID,B.signflag,B.isbest,B.PostUserid,B.layer,b.isagree,U.useremail,U.homepage,U.oicq,U.sign,U.userclass,U.title,U.width,U.height,U.article,U.face,U.addDate,U.userWealth,U.userEP,U.userCP,U.birthday,U.sex,u.UserGroup,u.LockUser,u.userPower,U.titlepic,U.UserGroupID,U.LastLogin,B.PostBuyUser from "&TotalUseTable&" B inner join [user] U on U.UserID=B.PostUserID where B.BoardID="&BoardID&" and B.RootID="&Announceid&" and B.locktopic<2 order by B.AnnounceID" end if end if set rs=server.createobject("adodb.recordset") 'response.write sql rs.open sql,conn,1 if rs.eof and rs.bof then Errmsg=Errmsg+"
    "+"
  • 该帖子无法浏览,可能的原因有:帖子已被删除、发贴用户不存在、该帖子正在审核中。" Founderr=true exit sub end if if not(rs.eof and rs.bof) then if TopicCount mod Cint(Board_Setting(27))=0 then Pcount= TopicCount \ Cint(Board_Setting(27)) else Pcount= TopicCount \ Cint(Board_Setting(27))+1 end if RS.MoveFirst if star > Pcount then star = Pcount if star < 1 then star = 1 RS.Move (star-1) * Board_Setting(27) page_count=0 Dim useremail,homepage,oicq,sign,userclass,title,width,uheight,article,face Dim addtime,userWealth,userEP,userCP,userbirth,sex,UserGroup,usercolor,namestyle Dim LockUser,userPower,istopic,PostUserGroup,UserLastLogin,userip,reUserGroupID Dim bestTitle,istoptitle Dim RootID,signflag,isbest,PostUserID,layer,isagree,bbsisagree istopic=false 'AnnounceID=0,BoardID=1,UserName=2,Topic=3,dateandtime=4,body=5,Expression=6,ip=7,RootID=8,signflag=9,isbest=10,PostUserid=11,layer=12,isagree=13,useremail=14,homepage=15,oicq=16,sign=17,userclass=18,title=19,width=20,height=21,article=22,face=23,addDate=24,userWealth=25,userEP=26,userCP=27,birthday=28,sex=29,UserGroup=30,LockUser=31,userPower=32,titlepic=33,UserGroupID=34,LastLogin=35 do while not rs.eof and page_count < Cint(Board_Setting(27)) username=rs(2) RootID=rs(8) signflag=rs(9) isbest=rs(10) PostUserID=rs(11) layer=rs(12) isagree=rs(13) if isnull(isagree) or isagree="" then isagree="0|0" bbsisagree=split(isagree,"|") if star=1 and skin=0 and layer=1 then istopic=true replyid=rs(0) noagree=bbsisagree(1) isagree=bbsisagree(0) elseif layer=1 and skin=1 then istopic=true replyid=rs(0) noagree=bbsisagree(1) isagree=bbsisagree(0) end if useremail=rs(14) homepage=rs(15) oicq=rs(16) sign=rs(17) userclass=rs(18) title=rs(19) width=rs(20) if isnull(width) or width=0 then width="" else width="width="&width end if uheight=rs(21) if isnull(uheight) or uheight=0 then uheight="" else uheight="height="&uheight end if article=rs(22) face=rs(23) addtime=rs(24) if not isdate(addtime) then addtime=now() userWealth=rs(25) userEP=rs(26) userCP=rs(27) userbirth=rs(28) sex=rs(29) UserGroup=rs(30) LockUser=rs(31) userPower=rs(32) reUserGroupID=rs(34) UserLastLogin=rs(35) PostBuyUser=rs(36) if reUserGroupID=8 then namestyle="filter:glow(color="&Forum_body(22)&",strength=2)" usercolor=Forum_body(21) elseif reUserGroupID=3 then namestyle="filter:glow(color="&Forum_body(18)&",strength=2)" usercolor=Forum_body(17) elseif reUserGroupID=1 then namestyle="filter:glow(color="&Forum_body(20)&",strength=2)" usercolor=Forum_body(19) else namestyle="filter:glow(color="&Forum_body(16)&",strength=2)" usercolor=Forum_body(15) end if if bgcolor="tablebody1" then bgcolor="tablebody2" abgcolor="tablebody1" else bgcolor="tablebody1" abgcolor="tablebody2" end if if userbirth="" or isnull(userbirth) then userbirth="" else userbirth=astro(userbirth) end if response.write "" response.write "" response.write "" response.write "
    " response.write "" response.write "" response.write "
     "&htmlencode(UserName)&" "&isOnline(PostUserid,sex)&"" 'if DateDiff("s",UserLastLogin,Now())>Cint(Forum_Setting(8))*60 then ' if sex=1 then ' response.write "帅哥哟,离线,有人找我吗?" ' else ' response.write "美女呀,离线,快来找我吧!" ' end if 'else ' if sex=1 then ' response.write "帅哥哟,在线,有人找我吗?" ' else ' response.write "美女呀,在线,快来找我吧!" ' end if 'end if response.write ""&userbirth&"
    " if Cint(forum_setting(53))=1 and face<>"" then response.write "  
    " response.write "  
    " if title<>"" then response.write "  头衔:" & htmlencode(title) & "
    " response.write "  等级:"& userclass &"
    " if isnumeric(userPower) and userPower>0 then response.write "  威望:"&userPower&"
    " response.write "  文章:"&article&"
    " response.write "  积分:" & userEP&"
    " if UserGroup<>"" and not UserGroup="无门无派" then response.write "  门派:" & htmlencode(UserGroup) & "
    " response.write "  注册:"&FormatDateTime(addtime,2)&"
    " response.write "
    " response.write " " response.write " " response.write " " response.write " " if useremail<>"" then response.write " " if oicq<>"" then response.write " " if homepage<>"" then response.write " " response.write "引用回复这个贴子 " response.write "回复这个贴子" if star=1 and page_count=0 then response.write "楼主" else response.write "第" &(star-1)*Cint(Board_Setting(27))+page_count+1 & "楼" end if response.write "
    " response.write "
    " if LockUser=2 then response.write "================================
    该用户发言已被管理员屏蔽
    ================================" else if rs("isbest")=1 and Cint(GroupSetting(41))=0 then response.write "================================
    您没有浏览该精华帖子的权限
    ================================" else response.write "发贴心情 "&htmlencode(rs(3)) &"
    "&dvbcode(rs(5),reUserGroupID,1)&"" end if end if response.write "
    " if signflag=1 and lockuser=0 and Cint(forum_setting(42))=1 then if sign<>"" then response.write "

    ----------------------------------------------
    "&dvsigncode(sign,reUserGroupID)&"

    " end if if Cint(GroupSetting(30))=0 then userip="*.*.*.*" else userip=rs("ip") end if response.write "
    发贴IP:"&userip&"""> "&rs(4)&"" response.write "" response.write "" response.write "
    " if founduser then if Cint(GroupSetting(10))=1 or Cint(GroupSetting(23))=1 then response.write "编辑这个贴子" end if end if if istopic then response.write "  鲜花("&isagree&")  鸡蛋("&noagree&")" response.write "" if Cint(GroupSetting(11))=1 or Cint(GroupSetting(18))=1 then if rs("isbest")=0 then besttitle="精华" else bestTitle="解除精华" end if if not istopic then response.write " " end if response.write " " response.write "" end if response.write "
    " response.write "
    " page_count = page_count + 1 isagree="" istopic=false rs.movenext loop else ErrMsg=ErrMsg+"
    "+"
  • 您指定的贴子不存在
  • " exit sub end if response.write "
    本主题贴数"&TopicCount&",分页:" if star > 4 then response.write "[1] ..." end if if Pcount>star+3 then endpage=star+3 else endpage=Pcount end if for i=star-3 to endpage if not i<1 then if i = clng(star) then response.write " ["&i&"]" else response.write " ["&i&"]" end if end if next if star+3 < Pcount then response.write "... ["&Pcount&"]" end if rs.close set rs=nothing response.write "
    " if cint(skin)=1 then %>
    <% dim outtext,bytestr,fontcolor set rs=server.createobject("adodb.recordset") sql="select AnnounceID,parentID,BoardID,UserName,PostUserid,Topic,DateAndTime,length,RootID,layer,orders,Expression,body from "&TotalUseTable&" where BoardID="&cstr(BoardID)&" and RootID="&Announceid&" and Locktopic<2 order by RootID desc,orders" rs.open sql,conn,1,1 if not(rs.eof and rs.bof) then do while not rs.eof if bgcolor="tablebody1" then bgcolor="tablebody2" else bgcolor="tablebody1" end if if clng(replyid)=rs(0) then fontcolor="" else fontcolor="" end if bytestr="("+cstr(rs("length")) if rs("Length")-1=1 then bytestr=bytestr+"字)" else bytestr=bytestr+"字)" end if if rs("length")=0 then bytestr="(空)" end if if rs("layer")>1 then for i=2 to rs("layer") outtext=outtext & "     " next outtext=outtext & "回复:" else outtext=outtext & "主题:" end if outtext=outtext & "  " outtext=outtext & "" & fontcolor if rs("topic")="" or isnull(rs("topic")) then if len(rs("body"))>35 then outtext=outtext & reubbcode(mid(htmlencode(replace(rs("body"),chr(10),"")),1,49))+".." else outtext=outtext & reubbcode(htmlencode(replace(rs("body"),chr(10),""))) end if else if len(rs("Topic"))>35 then outtext=outtext & mid(htmlencode(rs("Topic")),1,49)+".." else outtext=outtext & htmlencode(rs("Topic")) end if end if response.write "" rs.movenext outtext="" loop end if rs.close set rs=nothing response.write "
     *树形目录 顶端 
    "&outtext&""&bytestr&" - "&HTMLEncode(rs("UserName"))&"," & Formatdatetime(rs("DateAndTime"),1) & "

    " end if if canreply then %> >
     *快速回复:<%=htmlencode(topic_1)%>
    你的用户名:    还没注册?    密码:    忘记密码?
  • [ 还没注册 ]
  • [ 忘记密码 ]
  • [加入心情图标]
  • 将放在帖子的前面
  • <%for i=0 to Forum_PostFaceNum-1%> >   <%if i>0 and ((i+1) mod 9=0) then response.write "
    "%> <%next%>
    内容
  • HTML标签: <%=iif(Board_Setting(5),"可用","不可用")%>
  • UBB标签: <%=iif(Board_Setting(6),"可用","不可用")%>
  • 贴图标签: <%=iif(Board_Setting(7),"可用","不可用")%>
  • 多媒体标签:<%=iif(Board_Setting(9),"可用","不可用")%>
  • 表情字符转换:<%=iif(Board_Setting(8),"可用","不可用")%>
  • 上传图片:<%=iif(Forum_Setting(3),"可用","不可用")%>
  • 最多<%=Board_Setting(16)\1024%>KB
  • 邮件回复 显示签名   [Ctrl+Enter直接提交贴子]
    <% end if dim istoptitle_a if istopic or skin=0 then if istop=2 then istoptitle_a="解除总固顶" else istoptitle_a="总固顶" if istop=1 then istoptitle="解固" else istoptitle="固顶" %>
    管理选项锁定 | 解锁 | 提升 | 删除 | 移动 | ><%=istopTitle%> | ><%=istopTitle_a%> | 奖励 | 惩罚 | 发布公告
    <%end if%>
    method=post target=preview_page>
    <% call activeonline() end sub sub readRe() dim rs1,ID set rs1=conn.execute("select reAnn from [user] where UserID="&UserID&" and reAnn is not null") if not (rs1.eof and rs1.bof) then ID=split(rs1("reAnn"),"|")(1) if clng(ID)=clng(AnnounceID) then conn.execute ("update [user] set reAnn=null where UserID="&UserID) end if end if rs1.close set rs1=nothing end sub function isOnline(Userid,sex) dim ors set ors=conn.execute("select username from online where userid="&userid&" "&userhiddensql&"") if ors.eof and ors.bof then if sex=1 then isonline="帅哥哟,离线,有人找我吗?" else isonline="美女呀,离线,快来找我吧!" end if else if sex=1 then isonline="帅哥哟,在线,有人找我吗?" else isonline="美女呀,在线,快来找我吧!" end if end if ors.close set ors=nothing end function %>